<!--
  *@Description : 发布日常top头组件
  *@author 萧红
  *@date 2020-03-15 23:30
  *@LastEditTime 2020-03-15 23:30
  *@LastEdititors
-->
<template>
    <cube-sticky :pos="0">
      <div id="add-top">
        <div class="back" @click="$router.back()">
          <i class="cubeic-back"></i>
        </div>
        <div class="title">{{title}}</div>
        <div class="commit" @click="$emit('commit')">发布</div>
      </div>
    </cube-sticky>
</template>

<script>
export default {
  name: 'AddTop',
  props: {
    title: {
      type: String,
      default: '发动态'
    }
  }
}
</script>

<style scoped lang="stylus">
  #add-top
  {
    background-color deeppink
    clear both
    height 45px
    line-height 45px
    padding 0px 10px
    position relative
    color: snow
    div{
      float left
    }
    .back
    {
      width: 30px
      font-size: 16px
    }
    .title
    {
      font-size 16px
      font-weight bolder
      letter-spacing 5px
      position absolute
      left 50%
      transform translateX(-50%)
    }
    .commit
    {
      color #ddd
      font-size: 14px
      padding 0px 10px
      float right
    }
  }
</style>
